import asyncio

async def fun1():
    while True:
        await asyncio.sleep(1)
        print("shit1")

async def fun2():
    while True:
        await asyncio.sleep(4)
        print("shit2")   

print(fun2())
async def main():
    await fun2()
    await fun1()
#     task1 = asyncio.create_task(fun2())
#     task2 = asyncio.create_task(fun1())
#     # Schedule three calls *concurrently*:
#     # await asyncio.gather(
#     #     fun1(),
#     #     fun2()
#     # )
# # loop = asyncio.get_event_loop()
# # loop.run_until_complete(fun2())
#     await task1
#     await task2

asyncio.run(main())
print("finished ")
input()